<ion-header>
  <ion-navbar>
    <button menuToggle>
      <ion-icon name="menu"></ion-icon>
    </button>
    <ion-title>Signup</ion-title>
  </ion-navbar>
</ion-header>

<ion-content class="login-page">

  <ion-list>
    <div class="logo">
      <img src="img/appicon.svg">
    </div>

    <form #signupForm="ngForm" novalidate>
      <ion-item>
        <ion-label floating primary>Username</ion-label>
        <ion-input [(ngModel)]="signup.username" name="username" type="text" #username="ngModel" required>
        </ion-input>
      </ion-item>
      <p [hidden]="username.valid || submitted == false" danger padding-left>
        Username is required
      </p>

      <ion-item>
        <ion-label floating primary>Password</ion-label>
        <ion-input [(ngModel)]="signup.password" name="password" type="password" #password="ngModel" required>
        </ion-input>
      </ion-item>
      <p [hidden]="password.valid || submitted == false" danger padding-left>
        Password is required
      </p>

      <div padding>
        <button (click)="onSignup(signupForm)" type="submit" primary block>Create</button>
      </div>
    </form>
  </ion-list>

</ion-content>
